// 导入变量和重置样式
@import './variables.scss';
@import './reset.scss';

// 全局样式
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

#app {
  width: 100%;
  min-height: 100vh;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
  
  &:hover {
    opacity: 0.8;
  }
}

// 通用动画类
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 10px var(--color-primary), 0 0 20px var(--color-primary);
  }
  50% {
    box-shadow: 0 0 20px var(--color-primary), 0 0 40px var(--color-primary);
  }
}

@keyframes glowSecondary {
  0%, 100% {
    box-shadow: 0 0 10px var(--color-secondary), 0 0 20px var(--color-secondary);
  }
  50% {
    box-shadow: 0 0 20px var(--color-secondary), 0 0 40px var(--color-secondary);
  }
}

@keyframes glowAccent {
  0%, 100% {
    box-shadow: 0 0 10px var(--color-accent), 0 0 20px var(--color-accent);
  }
  50% {
    box-shadow: 0 0 20px var(--color-accent), 0 0 40px var(--color-accent);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100vh);
  }
}

@keyframes flicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  75% {
    opacity: 0.9;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

// 动画工具类
.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.glow {
  animation: glow 2s ease-in-out infinite;
}

.glow-secondary {
  animation: glowSecondary 2s ease-in-out infinite;
}

.glow-accent {
  animation: glowAccent 2s ease-in-out infinite;
}

.slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

.slide-in-down {
  animation: slideInDown 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.flicker {
  animation: flicker 3s ease-in-out infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

.rotate {
  animation: rotate 2s linear infinite;
}

// 扫描线效果
.scanline-container {
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
      to bottom,
      transparent,
      var(--color-primary),
      transparent
    );
    opacity: 0.3;
    animation: scanline 4s linear infinite;
    pointer-events: none;
    z-index: 1000;
  }
}

// 网格背景
.grid-background {
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

// 发光边框
.glow-border {
  border: 1px solid var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary), 0 0 20px var(--color-primary);
}

.glow-border-secondary {
  border: 1px solid var(--color-secondary);
  box-shadow: 0 0 10px var(--color-secondary), 0 0 20px var(--color-secondary);
}

.glow-border-accent {
  border: 1px solid var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent), 0 0 20px var(--color-accent);
}
